﻿@{
    ViewBag.Title = "铸造检斤";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section scripts{
    <script src="~/Areas/Weight/ViewModels/Weight.viewModel.search.js"></script>
    <script type="text/javascript">
        var data = @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model));
        var viewModel = function(){
            var self = this;
            Weight.viewModel.search.apply(this,arguments);
            this.printClick = function(){
                    var tm = self.form.S_TM();
                    var rUrl = "../../Areas/Weight/Greport/WebForm1.aspx?S_TM=" + tm ;
                    com.openTab("打印测试", rUrl);
                   // window.open(rUrl, "测试", "");

            };
        }
        ko.bindingViewModel(new viewModel(data));

    </script>
}
<div class="z-toolbar">
    <a id="a_refresh" href="#" plain="true" class="easyui-linkbutton" icon="icon-arrow_refresh"
        title="刷新" data-bind="click:refreshClick">刷新</a> @*<a id="a_add" href="#" plain="true" class="easyui-linkbutton" icon="icon-add" title="新增" data-bind="click:deleteClick" >新增</a>
        <a id="a_edit" href="#" plain="true" class="easyui-linkbutton" icon="icon-edit" data-bind="click:deleteClick" title="编辑" >编辑</a>
        <a id="a_del" href="#" plain="true" class="easyui-linkbutton" icon="icon-cross" title="删除" data-bind="click:deleteClick"  >删除</a>
        <a id="a_audit" href="#" plain="true" class="easyui-linkbutton" icon="icon-user-accept" data-bind="click:auditClick" title="审核">审核</a>*@
    <a id="a_export" href="#" class="easyui-splitbutton" data-options="menu:'#dropdown',iconCls:'icon-download'">
        导出</a> <a id="a_printer" href="#" plain="true" class="easyui-linkbutton" icon="icon-printer"
            title="打印" data-bind="click:printClick">打印</a>
</div>
<div id="dropdown" style="width: 100px; display: none;">
    <div data-options="iconCls:'icon-ext-xls'" suffix="xls" data-bind="click:downloadClick">
        Excel2003
    </div>
    <div data-options="iconCls:'icon-page_excel'" suffix="xlsx" data-bind="click:downloadClick">
        Excel2007
    </div>
    <div data-options="iconCls:'icon-ext-doc'" suffix="doc" data-bind="click:downloadClick">
        Word2003
    </div>
</div>
<div id="condition" class="container_12" style="position: relative;">
    <div class="grid_1 lbl">
        条码</div>
    <div class="grid_2 val">
        <input type="text" id = "S_TM" data-bind="value:form.S_TM" class="z-txt" /></div>
    <div class="grid_1 lbl">
        生产线号</div>
    <div class="grid_2 val">
        <input type="text" data-bind="value:form.S_SCXH" class="z-txt" /></div>
    <div class="grid_1 lbl">
        牌号</div>
    <div class="grid_2 val">
        <input type="text" data-bind="datasource:dataSource.GetPaiHaoItems,comboboxValue:form.S_PH"
            class="z-txt easyui-combobox" /></div>
    <div class="clear">
    </div>
    <div class="grid_1 lbl">
        班次</div>
    <div class="grid_2 val">
        <input type="text" data-bind="value:form.S_BCDM" class="z-txt " /></div>
    <div class="grid_1 lbl">
        称重时间</div>
    <div class="grid_2 val">
        <input type="text" data-bind="value:form.D_ZZMZSJ" class="z-txt easyui-daterange" /></div>
    <div class="grid_1 lbl">
        质检结果</div>
    <div class="grid_2 val">
        <input type="text" data-bind="datasource:dataSource.JGitems,comboboxValue:form.S_ZJJG"
            class="z-txt easyui-combobox" /></div>
    <div class="clear">
    </div>
    <div class="prefix_9" style="position: absolute; top: 5px; height: 0;">
        <a id="a_search" href="#" class="button button-blue" style="margin: 0 15px;" data-bind="click:searchClick">
            查询</a> <a id="a_reset" href="#" class="button button-blue" data-bind="click:clearClick">
                清空</a>
    </div>
</div>
<table id="gridlist" data-bind="datagrid:grid">
    <thead>
        <tr>
            <th field="S_SCXH" sortable="true" align="left" width="45">
                线号
            </th>
            <th field="S_TM" sortable="true" align="left" width="135">
                条码
            </th>
            <th field="S_PH" sortable="true" align="left" width="56">
                牌号
            </th>
            <th field="S_JLQXMC" sortable="true" align="left" width="100">
                衡器
            </th>
            <th field="S_BZMC" sortable="true" align="left" width="80">
                班组
            </th>
            <th field="S_BCMC" sortable="true" align="left" width="80">
                班次
            </th>
            <th field="N_ZZMZ" sortable="true" align="left" width="80">
                毛重(kg)
            </th>
            <th field="N_ZZPZ" sortable="true" align="left" width="80">
                皮重(kg)
            </th>
            <th field="N_ZZJZ" sortable="true" align="left" width="80">
                净重(kg)
            </th>
            <th field="D_ZZMZSJ" sortable="true" align="left" width="130" formatter="com.formatTime">
                称重时间
            </th>
            <th field="S_JLYMC" sortable="true" align="left" width="80">
                计量员
            </th>
            <th field="S_ZJYMC" sortable="true" align="left" width="80">
                质检员
            </th>
            <th field="S_XZZMC" sortable="true" align="left" width="80">
                小组长
            </th>
            <th field="I_KS" sortable="true" align="left" width="60">
                块数
            </th>
            <th field="S_ZJJG" sortable="true" align="left" width="100">
                质检结果
            </th>
            <th field="S_BZ" sortable="true" align="left" width="300">
                备注(混捆熔炼号)
            </th>
        </tr>
    </thead>
</table>
